package com.jay.media.music.core.db

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable

/**
 * @author xuzhou4
 * @date 2022/2/14
 */
@Entity(tableName = "music")
class Music : Serializable {

    @PrimaryKey
    var data: String = ""

    @ColumnInfo
    var id: String = ""

    @ColumnInfo
    var displayName: String = ""

    @ColumnInfo
    var title: String = ""

    @ColumnInfo
    var artist = ""

    @ColumnInfo
    var album = ""

    @ColumnInfo
    var albumArt = ""

    @ColumnInfo
    var duration = 0L


    @ColumnInfo(defaultValue = "0")
    var playListType: Int = 0

    @ColumnInfo(defaultValue = "0")
    var playListOrder: Int = 0

    @ColumnInfo(defaultValue = "0")
    var playListTime: Long = 0


    @ColumnInfo(defaultValue = "0")
    var playHistoryType: Int = 0

    @ColumnInfo(defaultValue = "0")
    var playHistoryOrder: Int = 0

    @ColumnInfo(defaultValue = "0")
    var playHistoryTime: Long = 0


    @ColumnInfo(defaultValue = "0")
    var favorType: Int = 0

    @ColumnInfo(defaultValue = "0")
    var favorTypeOrder: Int = 0

    @ColumnInfo(defaultValue = "0")
    var favorTypeTime: Long = 0

    override fun toString(): String {
        return "Music(data='$data', id='$id', displayName='$displayName', title='$title', artist='$artist', album='$album', duration=$duration, playListType=$playListType, playListOrder=$playListOrder, playListTime=$playListTime, playHistoryType=$playHistoryType, playHistoryOrder=$playHistoryOrder, playHistoryTime=$playHistoryTime, favorType=$favorType, favorTypeOrder=$favorTypeOrder, favorTypeTime=$favorTypeTime)"
    }
}